package org.dfl.plugin.navigator;

import java.io.File;

import org.eclipse.core.runtime.IAdaptable;

/**
 * adaptor for file instances
 * @author Piotr Wlodarczyk
 *
 */
public class FileAdapter implements IAdaptable {
	private File f;
	
	public FileAdapter(File f) {
		super();
		this.f = f;
	}

	public FileAdapter(String location) {
		f = new File(location);
	}

	@SuppressWarnings("unchecked")
	public File getAdapter(Class adapter) {
		if(adapter == java.io.File.class){
			return f;
		}
		return null;
	}

}
